home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 May: Tool Chest / Apple_Developer_CD_Series_May_1994_Tool_Chest.iso / Tool Chest / Interfaces / Universal Interfaces / string.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-10  |  1.7 KB  |  90 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     string.h
  4.     String handling
  5.     
  6.     Copyright Apple Computer,Inc.  1987-1990, 1993
  7.     All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef __STRING__
  13. #define __STRING__
  14.  
  15. #ifndef __size_t__
  16. #define __size_t__
  17. #ifdef powerc
  18. typedef unsigned long size_t;
  19. #else
  20. typedef unsigned int size_t;
  21. #endif /* powerc */
  22. #endif
  23.  
  24. #ifndef NULL
  25. #define NULL 0
  26. #endif
  27.  
  28. /*
  29.  *    Copying functions
  30.  */
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. void *memcpy (void *s1, const void *s2, size_t n);
  37. void *memmove (void *s1, const void *s2, size_t n);
  38. char *strcpy (char *s1, const char *s2);
  39. char *strncpy (char *s1, const char *s2, size_t n);
  40.  
  41. #if __STDC__ == 0
  42. void *memccpy(void *s1, const void *s2, int c, size_t n);
  43. #endif
  44.  
  45. /*
  46.  *    Concatenation functions
  47.  */
  48.  
  49. char *strcat (char *s1, const char *s2);
  50. char *strncat (char *s1, const char *s2, size_t n);
  51.  
  52. /*
  53.  *    Comparison functions
  54.  */
  55.  
  56. int memcmp (const void *s1, const void *s2, size_t n);
  57. int strcmp (const char *s1, const char *s2);
  58. int strcoll (const char *s1, const char *s2);
  59. int strncmp (const char *s1, const char *s2, size_t n);
  60. size_t strxfrm (char *s1, const char *s2, size_t n);
  61.  
  62.  
  63. /*
  64.  *    Search functions
  65.  */
  66.  
  67. void *memchr (const void *s, int c, size_t n);
  68. char *strchr (const char *s, int c);
  69. size_t strcspn (const char *s1, const char *s2);
  70. char * strpbrk (const char *s1, const char *s2);
  71. char *strrchr (const char *s, int c);
  72. size_t strspn (const char *s1, const char *s2);
  73. char *strstr (const char *s1, const char *s2);
  74. char *strtok (char *s1, const char *s2);
  75.  
  76.  
  77. /*
  78.  *    Miscellaneous functions
  79.  */
  80.  
  81. void *memset (void *s, int c, size_t n);
  82. char *strerror (int errnum);
  83. size_t strlen (const char *s);
  84.  
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88.  
  89. #endif
  90.